<?php
//require_once  __DIR__ . '/includes/authenticate.php';

if (isset($_POST['season']) && isset($_POST['date'])) {
	
include_once './db_bb_connect.php';

$season = $_POST['season'];
$date = $_POST['date'];
$subjects = $_POST['subjects'];
$comment = $_POST['comment'];

$sql = "INSERT INTO traininginfo (date, season, subjects, comment) 
VALUES ('$date','$season','$subjects','$comment')";

if ($db->query($sql)) {
	echo "<br><center><strong>General training data for $date succesfully added! </strong></center>";
} else {
	echo "<br><center>Error: " . $sql . "<br>" . $db->error . "</center>";
}


}



?>